import { defineStore } from 'pinia'
import { getConnectionSocket,closeConnectionSocket,sendMessage } from '@/api/supportWebSocket'
export const useMsgStore = defineStore('msg', {
  state: () => ({
    
  }),
  
  getters: {
  },
  
  actions: {
    async handleGetConnection(){
      await getConnectionSocket()
    },
    async handleCloseConnection(){
      await closeConnectionSocket()
    },
    async sendMessage(msg){
      await sendMessage(msg)
    }
  }
}) 